package com.crx.springbootinit.controller.admin;

import com.crx.springbootinit.annotation.AuthCheck;
import com.crx.springbootinit.annotation.LogApiAnno;
import com.crx.springbootinit.common.BaseResponse;
import com.crx.springbootinit.model.dto.comment.CommentsLovePageDTO;
import com.crx.springbootinit.model.dto.comment.CommentsPageDTO;
import com.crx.springbootinit.model.dto.page.PageVO;
import com.crx.springbootinit.model.vo.comment.CommentLovePageVO;
import com.crx.springbootinit.model.vo.comment.CommentPageVO;
import com.crx.springbootinit.service.ICommentLoveService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/commentLove")
@Api(tags = "后台评论点赞模块接口")
public class CommentLoveAdminController {
    @Autowired
    private ICommentLoveService commentLoveService;

    @GetMapping("/page")
    @ResponseBody
    @ApiOperation("分页查点赞询评论列表")
    @LogApiAnno(title = "分页点赞查询模块", businessType = "GET")
    @AuthCheck
    public BaseResponse page(CommentsLovePageDTO commentsLovePageDTO){
        PageVO<CommentLovePageVO> pageVO = commentLoveService.queryCommentLovePage(commentsLovePageDTO);
        return BaseResponse.success(pageVO);
    }

}
